<script setup>
    import useSum from '@/hooks/useSum.js'
    import useDog from '@/hooks/useDog.js'
    //解构
    const {sum,sumAdd} = useSum()
    const {imagesList,getImage,count} = useDog()
</script>

<template>
    <div class="teacher">
        <h3>当前sum的值是:{{sum}}</h3>
        <button @click="sumAdd">点我sum+1</button>
        <hr/>
        <img v-for="(item,index) in imagesList" :key="index" :src="item" alt="">
        <button @click="getImage">再来一只小狗</button>
        <h3>狗的数量x10之后的数量是:{{count}}</h3>
    </div>
</template>

<style scoped>
.teacher{
    background-color: bisque;
    padding: 5px;
    margin-top: 20px;
}
img{
    width: 100px;
    margin-right: 10px;
}
</style>